#include "Utils/TestClass.h"
#include "Structures/Config.h"

#include "Algorithms/IAlgorithm.h"
#include "Algorithms/Naive.h"
#include "Algorithms/BoyerMoore.h"
#include "Algorithms/KarpRabin.h"
#include "Algorithms/KnuthMorrisPratt.h"
#include "Algorithms/MorrisPratt.h"
#include "Algorithms/ShiftOr.h"
#include "Algorithms/NotSoNaive.h"
#include "Algorithms/Simon.h"
#include "Algorithms/Colussi.h"
#include "Algorithms/ReverseColussi.h"
#include "Algorithms/GalilGiancarlo.h"
#include "Algorithms/ApostolicoCrochemore.h"
#include "Algorithms/Horspool.h"
#include "Algorithms/QuickSearch.h"
#include "Algorithms/TunedBoyerMoore.h"
#include "Algorithms/ZhuTakaoka.h"
#include "Algorithms/BerryRavindran.h"
#include "Algorithms/Smith.h"
#include "Algorithms/Raita.h"
#include "Algorithms/SkipSearch.h"
#include "Algorithms/DeterministicFiniteAutomation.h"
#include "Algorithms/TurboBoyerMoore.h"
#include "Algorithms/ApostolicoGiancarlo.h"
#include "Algorithms/ReverseFactor.h"
#include "Algorithms/TurboReverseFactor.h"
#include "Algorithms/ForwardDawgMatching.h"
#include "Algorithms/BackwardNondeterministicDawgMatching.h"
#include "Algorithms/BackwardOracleMatching.h"
#include "Algorithms/GaliliSeiferas.h"
#include "Algorithms/TwoWay.h"
#include "Algorithms/StringMatchingOnOrderedAlphabets.h"
#include "Algorithms/OptimalMismatch.h"
#include "Algorithms/MaximalShift.h"
#include "Algorithms/KmpSkipSearch.h"
#include "Algorithms/AlphaSkipSearch.h"

#include <iostream>
#include <fstream>

using namespace std;

int main()
{
	system("mode CON: COLS=120");

	ofstream myfile;
	myfile.open("c:\\Dokumenty\\Studia\\SE Semestr 2-3\\Magisterka\\testResults.csv", fstream::in | fstream::out | fstream::app);

	TestClass* testClass = new TestClass(cout);

	testClass->addAlgorithm(new BoyerMoore());

//	testClass->addAlgorithm(new AlphaSkipSearch()); /* Bugged */
//	testClass->addAlgorithm(new BackwardNondeterministicDawgMatching()); /* Bugged*/
//	testClass->addAlgorithm(new BackwardOracleMatching()); /* Bugged*/
//	testClass->addAlgorithm(new GaliliSeiferas()); /* Bugged spaghetti code*/
//	testClass->addAlgorithm(new KmpSkipSearch()); /* Bugged */

	testClass->addAlgorithm(new Naive()); /* Big execution time*/
	testClass->addAlgorithm(new Simon()); /* Big execution time*/
	testClass->addAlgorithm(new ForwardDawgMatching()); /* Big execution time*/
	testClass->addAlgorithm(new KarpRabin());
	testClass->addAlgorithm(new MorrisPratt());
	testClass->addAlgorithm(new ShiftOr());
	testClass->addAlgorithm(new NotSoNaive());
	testClass->addAlgorithm(new Colussi());
	testClass->addAlgorithm(new ReverseColussi());
	testClass->addAlgorithm(new GalilGiancarlo());
	testClass->addAlgorithm(new Horspool());
	testClass->addAlgorithm(new TunedBoyerMoore());
	testClass->addAlgorithm(new ZhuTakaoka());
	testClass->addAlgorithm(new BerryRavindran());
	testClass->addAlgorithm(new Smith());
	testClass->addAlgorithm(new Raita());
	testClass->addAlgorithm(new TurboBoyerMoore());
	testClass->addAlgorithm(new ApostolicoGiancarlo());
	testClass->addAlgorithm(new ReverseFactor());
	testClass->addAlgorithm(new TurboReverseFactor());
	testClass->addAlgorithm(new SkipSearch());
	testClass->addAlgorithm(new KnuthMorrisPratt());
	testClass->addAlgorithm(new ApostolicoCrochemore());
	testClass->addAlgorithm(new QuickSearch());
	testClass->addAlgorithm(new OptimalMismatch());
	testClass->addAlgorithm(new MaximalShift());
	testClass->addAlgorithm(new TwoWay()); /* Looped */
	testClass->addAlgorithm(new StringMatchingOnOrderedAlphabets());
//	testClass->addAlgorithm(new DeterministicFiniteAutomation());

	//for (int i = 0; i < 5; i++)
	testClass->test();

	myfile.close();

	cout << "finished";

	return 0;
}
